package com.yhd.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * 浏览信息记录
 */
@Data
public class BrowseRecordDto {
    /**
     * 主键
     */
    @Id
    @Column(name = "ID")
    @KeySql(useGeneratedKeys = true)
    @ApiModelProperty(value = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "jdbc")
    private Integer id;

    /**
     * 课程id
     */
    @ApiModelProperty(value = "课程id")
    @Column(name = "courseId")
    private Integer courseId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @Column(name = "userId")
    private String userId;

    /**
     * 类型 activity:活动，course:课程
     */
    @Column(name = "type")
    @ApiModelProperty(value = "类型 activity:活动，course:课程")
    private String type;

    /**
     * 浏览次数
     */
    @Column(name = "total")
    @ApiModelProperty(value = "浏览次数")
    private Integer total;

    /**
     * 最后浏览时间
     */
    @ApiModelProperty(value = "最后浏览时间")
    @Column(name = "lastBrowseTime")
    private Date lastBrowseTime;

    /**
     * 浏览用户
     */
    @ApiModelProperty(value = "浏览用户信息")
    @Column(name = "userDto")
    private UserDto userDto;

    /**
     * 是否购买当前课程：0否 1是
     */
    @Column(name = "isPay")
    @ApiModelProperty(value = "是否购买当前课程：0否 1是")
    private Integer isPay;
}
